CC       = g++
CFLAGS   = -pipe -Wall -W -O2 -DLIN=1
INCPATH  = -I. -I./SDK/CHeaders/XPLM -I./SDK/CHeaders/Widgets -I./SDK/CHeaders/Wrappers
LFLAGS   = -shared -Wl,-rpath
RM_FILE  = rm -f

OBJECTS_DIR = ./

TARGET   = lin.xpl

HEADERS = 
SOURCES = commands.cpp \
	datarefs_save.cpp \
	dummy_datarefs.cpp \
	ins_accelerometer_am9.cpp \
	ins_garmin_gma_340.cpp \
	ins_garmin_gtx_327.cpp \
	local_time.cpp \
	main.cpp \
	timers.cpp \
	timers_down.cpp \
	tools.cpp \
	xplane_tools.cpp

OBJECTS = commands.o \
	datarefs_save.o \
	dummy_datarefs.o \
	ins_accelerometer_am9.o \
	ins_garmin_gma_340.o \
	ins_garmin_gtx_327.o \
	local_time.o \
	main.o \
	timers.o \
	timers_down.o \
	tools.o \
	xplane_tools.o 

first: all

.SUFFIXES: .c .o .cpp .cc .cxx .C

.cpp.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

all: Makefile $(TARGET)

$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC)  
	$(CC) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)

clean:
	-$(RM_FILE) $(OBJECTS)
	-$(RM_FILE) *~ core *.core


